package com.fqdf.framework.android.net.response;

import java.util.List;

public class NetListBeanWrapper<T> extends NetBaseWrapper {

    // 转化数据对象
    private DataListWrapper<T> modelData;

    public NetListBeanWrapper() {
        super();
    }

    public NetListBeanWrapper(boolean flag, String msg) {
        super(flag, msg);
    }

    public DataListWrapper<T> getModelData() {
        return modelData;
    }

    public List<T> getList() {
        return modelData == null ? null : modelData.getList();
    }

    public void setModelData(DataListWrapper<T> modelData) {
        this.modelData = modelData;
    }


    public static class DataListWrapper<S> {

        public DataListWrapper() {
        }

        public DataListWrapper(List<S> data) {
            list = data;
        }

        private List<S> list;

        public List<S> getList() {
            return list;
        }

        public void setList(List<S> list) {
            this.list = list;
        }
    }

    public boolean isDataListOK() {
        return modelData.getList() != null;
    }

}